package com.airlenet.dubbo.demo.service;

import com.airlenet.dubbo.demo.api.TestApi;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.rpc.RpcContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@DubboService
public class TestApiImpl implements TestApi {
    private Logger logger = LoggerFactory.getLogger(TestApi.class);

    @Override
    public void test() {
        logger.info("from {}:{} {}", RpcContext.getContext().getRemoteHost(), RpcContext.getContext().getRemotePort(),"test method");
    }
}
